
#ifndef __USER_TABLE__H_
#define __USER_TABLE__H_

#include "controller_types.h"

int user_table_init(void);

int user_table_read(uint32_t index, user_info_t* user);

int user_table_write(uint32_t index, user_info_t* user);

int user_table_erase(uint32_t index);

int user_table_find(const void* token, int (*compare)(const void* tk, const user_info_t* u), user_info_t* user, uint32_t* index);

int user_table_update_user(user_info_t* user);

int user_table_remove_user_by_pin(user_pin_t pin);

int user_table_remove_user_by_token(const user_token_t* token);

int user_table_find_user_by_pin(user_pin_t pin, user_info_t* user);

int user_table_find_user_by_token(const user_token_t* token, user_info_t* user);

#endif 


